home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 2410 / 2410.xpi / chrome / content / foxmarks-ownserverdlg.js < prev    next >
Text File  |  2010-01-28  |  980b  |  37 lines

  1. /*
  2.  Copyright 2005-2008 Foxmarks Inc.
  3.  
  4.  foxmarks-ownserverdlg.js: Implements a use own server dialog
  5.  
  6.  */
  7.  
  8. var gOwnServerParams;
  9. function ownServerLoad(){
  10.     gOwnServerParams = window.arguments[0];
  11.  
  12.     document.getElementById("url").value = gOwnServerParams.url;
  13.     document.getElementById("passwordurl").value = gOwnServerParams.purl;
  14. }
  15.  
  16. function ownServerOK(){
  17.     var url = document.getElementById("url").value;
  18.     var purl = document.getElementById("passwordurl").value;
  19.  
  20.     if(url.length && url != purl &&
  21.         (!gOwnServerParams.psync || purl.length)){
  22.         gOwnServerParams.url = document.getElementById("url").value;
  23.         gOwnServerParams.purl = document.getElementById("passwordurl").value;
  24.         gOwnServerParams.result = true;
  25.     } else {
  26.         Xmarks.Alert(Xmarks.Bundle().
  27.             GetStringFromName("error.ownserveremptyurl"));
  28.         return false;
  29.     }
  30.  
  31.     return true;
  32. }
  33.  
  34. function ownServerCancel(){
  35.     gOwnServerParams.result = false;
  36. }
  37.